import request from '../req'
// 获取保司列表
export const getInsureCompanyList = async (params: any) => {
    let res = await request.get('/insur/insurComInsuranceCompany/list', {
        params: params,
        noCancel: true
    })
    return res
}
// 行业工种列表
export const industryList = async (params: any) => {
    let res = await request.get('/period-insur/industry/list', {
        params: params
    })
    return res
}
// 新增行业工种
export const addIndustry = async (data: any) => {
    let res = await request.post('/period-insur/industry/add', data)
    return res
}
// 编辑行业工种
export const updateIndustry = async (data: any) => {
    let res = await request.post('/period-insur/industry/update', data)
    return res
}
// 删除行业工种
export const removeIndustry = async (data: any) => {
    let res = await request.post('/period-insur/industry/delete', data)
    return res
}
//长期保保司列表
export const getInsureComponyList = async (params: any) => {
    let res = await request.get('/insur/insurComInsuranceCompany/query-period-insurance-company', {
        params: params
    })
    return res
}
// 获取公司保险方案列表
export const getPlanList = async (params: any) => {
    let res = await request.get('/wesure/wesure-plan/period-plan-list', {
        params: params
    })
    return res
}
// 根据保司编码查询保司下的方案
export const getSolutionList = async (params: any) => {
    let res = await request.get('/insur/insurComInsuranceCompany/query-period-company-solution', {
        params: params
    })
    return res
}
// 新增保司
export const addInsureCompany = async (data: any) => {
    let res = await request.post('/insur/insurComInsuranceCompany/edit', data)
    return res
}

// 删除保司
export const removeInsureCompany = async (code: any) => {
    let res = await request.delete(`/insur/insurComInsuranceCompany/${code}`)
    return res
}

// 查询保司方案列表
export const getDchemeList = async (params: any) => {
    let res = await request.get(`/insur/insurComInsuranceCompany/getScheme`, {
        params: params
    })
    return res
}

// 新增/修改保司方案
export const addScheme = async (data: any) => {
    let res = await request.post(`/insur/insurComInsuranceCompany/addScheme`, data)
    return res
}

// 删除保司方案
export const removeScheme = async (ids: any) => {
    let res = await request.delete(`/insur/insurComInsuranceCompany/deleteSchemes/${ids}`)
    return res
}

// 查询保司方案带保单号
export const getPolicyList = async (params: any) => {
    let res = await request.get(`/com-insur/insur-com-company-policy/policy-list`, {
        params: params
    })
    return res
}
// 查询保司方案带保单号
export const updatePolicy = async (data: any) => {
    let res = await request.post(`/com-insur/insur-com-company-policy/edit-policy`, data)
    return res
}
// 新增保单号
export const addPolicy = async (data: any) => {
    let res = await request.post(`/com-insur/insur-com-company-policy/insert-policy`, data)
    return res
}

// 获取禁保区域列表
export const getQueryInsurRegionRestrictionList = async (params: any) => {
    let res = await request.get('/insur/insurComInsuranceCompany/query-insur-region-restriction', {
        params: params
    })
    return res
}

// 编辑禁保区域
export const editInsurRegionRestrictionApi = async (data: any) => {
    let res = await request.put('/insur/insurComInsuranceCompany/edit-insur-region-restriction', data)
    return res
}

// 删除禁保区域
export const deleteInsurRegionRestrictionApi = async (params: any) => {
    let res = await request.delete('/insur/insurComInsuranceCompany/delete-insur-region-restriction', {
        params: params
    })
    return res
}

// 新增禁保区域
export const addInsurRegionRestrictionApi = async (data: any) => {
    let res = await request.post('/insur/insurComInsuranceCompany/add-insur-region-restriction', data)
    return res
}

// 获取禁保区域白名单列表
export const getQueryInsurRegionRestrictionWhitelistApi = async (params: any) => {
    let res = await request.get('/insur/insurComInsuranceCompany/query-insur-region-restriction-whitelist', {
        params: params
    })
    return res
}

// 新增禁保区域白名单
export const addInsurRegionRestrictionWhitelistApi = async (data: any) => {
    let res = await request.post('/insur/insurComInsuranceCompany/add-insur-region-restriction-whitelist', data)
    return res
}

// 删除禁保区域白名单
export const deleteInsurRegionRestrictionWhitelistApi = async (params: any) => {
    let res = await request.delete('/insur/insurComInsuranceCompany/delete-insur-region-restriction-whitelist', {
        params: params
    })
    return res
}

// 编辑禁保区域白名单
export const editInsurRegionRestrictionWhitelistApi = async (data: any) => {
    let res = await request.put('/insur/insurComInsuranceCompany/edit-insur-region-restriction-whitelist', data)
    return res
}

